<include file="Public/min-header" />
<script type="text/javascript">
    window.UEDITOR_Admin_URL = "__ROOT__/Public/plugins/Ueditor/";
    var URL_upload = "{$URL_upload}";
    var URL_fileUp = "{$URL_fileUp}";
    var URL_scrawlUp = "{$URL_scrawlUp}";
    var URL_getRemoteImage = "{$URL_getRemoteImage}";
    var URL_imageManager = "{$URL_imageManager}";
    var URL_imageUp = "{$URL_imageUp}";
    var URL_getMovie = "{$URL_getMovie}";
    var URL_home = "{$URL_home}";
</script>
<load href="__ROOT__/Public/plugins/Ueditor/ueditor.config.js" />
<load href="__ROOT__/Public/plugins/Ueditor/ueditor.all.js" />
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/Public/Admin/css/style.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">查看特价活动</h3>
                        <a href="{:U('Promotion/special')}" data-toggle="tooltip" title="" class="btn btn-primary pull-right" data-original-title="返回"><i class="fa fa-reply"></i></a>
                    </div>
                    <form class="form-horizontal" action="{:U('Promotion/s_detail')}" id="add_post"  method="post">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">活动标题:</label>
                                <div class="col-sm-8" style="padding:6px;">{$info.title}</div>
                            </div>
                            <if condition="$info['type_id'] eq 1">
                                <div class="form-group">
                                    <label for="text" class="col-sm-2 control-label">条件金额:</label>
                                    <div class="col-sm-8" style="padding:6px;">{$info.fill_price}</div>
                                </div>
                            </if>
                            <if condition="$info['type_id'] eq 1">
                                <div class="form-group">
                                    <label for="text" class="col-sm-2 control-label">优惠金额:</label>
                                    <div class="col-sm-8" style="padding:6px;">{$info.use_price}</div>
                                </div>
                            </if>
                            <div class="form-group">
                                <label for="text" class="col-sm-2 control-label">活动开始时间:</label>
                                <div class="col-sm-8" style="padding:6px;">{$info.start_time|date="Y-m-d H:i:s",###}</div>
                            </div>
                            <div class="form-group">
                                <label for="text" class="col-sm-2 control-label">活动结束时间:</label>
                                <div class="col-sm-8" style="padding:6px;">{$info.end_time|date="Y-m-d H:i:s",###}</div>
                            </div>
                            <div class="form-group">
                                <label for="text" class="col-sm-2 control-label">活动商品:</label>
                                <div class="col-sm-8" style="line-height:32px;padding-left:3px;">
                                    <volist name="info['goods']" id="val">
                                        <div>{$val.goods_name}</div>
                                    </volist>
                                </div>
                            </div>
                            <if condition="$info['type_id'] eq 2">
                            <div class="form-group">
                                <label for="text" class="col-sm-2 control-label">特价价格:</label>
                                <div class="col-sm-8" style="padding:6px;">{$info.use_price}</div>
                            </div>
                            <elseif condition="$info['type_id'] eq 3"/>
                                <div class="form-group">
                                    <label for="text" class="col-sm-2 control-label">限购价格:</label>
                                    <div class="col-sm-8" style="padding:6px;">{$info.use_price}</div>
                                </div>
                                <div class="form-group">
                                    <label for="text" class="col-sm-2 control-label">限购数量:</label>
                                    <div class="col-sm-8" style="padding:6px;">{$info.use_number}</div>
                                </div>
                            </if>
                        </div>
                        <div class="box-footer row">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
</div>
<script src="__ROOT__/Public/Admin/js/date_time/WdatePicker.js"></script>
<script type="text/javascript">
    function checkForm() {
        if ($('input[name="title"]').val() == '') {
            layer.alert('请填写消息标题', {icon: 2 });
            return false;
        }
        if ($('input[name="use_price"]').val() == '') {
            layer.alert('请填写特价金额', {icon: 2 });
            return false;
        }
        $('#add_post').submit();
    }
    function change_goods(obj) {
        var price = $(obj).find("option:selected").attr("data");
        if (price > 0) {
            $('#use_price').html('本店售价:' + price);
        }
    }
</script>
</body>
</html>
